package com.grm.sys.mapper;

import com.grm.sys.model.SysPerm;
import com.grm.sys.request.perm.SysPermAddParam;
import com.grm.sys.request.perm.SysPermUpdateParam;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SysPermMapper {
    List<SysPerm> querySysPermsByUserIdAndTypes(@Param("userId") Long userId, @Param("types")List<String> types);

    List<SysPerm> queryListByTypes(@Param("types")List<String> types);

    List<SysPerm> queryAllList();

    void insert(SysPerm sysPerm);

    SysPerm queryByName(@Param("name")String name);

    SysPerm queryById(@Param("id")Long id);

    void update(SysPerm sysPerm);

    List<SysPerm> queryChildPerms(@Param("id") Long id);

    void deleteById(@Param("id") Long id);

    SysPerm queryByParentIdAndName(@Param("parentId") Long parentId, @Param("name") String name);
}
